Optimal. Leaf size=33 \[ -\frac{3 x^2}{4}-\frac{\cos ^2(x)}{4}-x \cot (x)+\log (\sin (x))-\frac{1}{2} x \sin (x) \cos (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0546779, antiderivative size = 33, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, Rules used = {4408, 3310, 30, 3720, 3475} \[ -\frac{3 x^2}{4}-\frac{\cos ^2(x)}{4}-x \cot (x)+\log (\sin (x))-\frac{1}{2} x \sin (x) \cos (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4408
Rule 3310
Rule 30
Rule 3720
Rule 3475
Rubi steps
\begin{align*} \int x \cos ^2(x) \cot ^2(x) \, dx &=-\int x \cos ^2(x) \, dx+\int x \cot ^2(x) \, dx\\ &=-\frac{1}{4} \cos ^2(x)-x \cot (x)-\frac{1}{2} x \cos (x) \sin (x)-\frac{\int x \, dx}{2}-\int x \, dx+\int \cot (x) \, dx\\ &=-\frac{3 x^2}{4}-\frac{\cos ^2(x)}{4}-x \cot (x)+\log (\sin (x))-\frac{1}{2} x \cos (x) \sin (x)\\ \end{align*}
Mathematica [A] time = 0.0250926, size = 33, normalized size = 1. \[ -\frac{3 x^2}{4}-\frac{1}{4} x \sin (2 x)-\frac{1}{8} \cos (2 x)-x \cot (x)+\log (\sin (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.093, size = 76, normalized size = 2.3 \begin{align*}{\frac{1}{2\,\tan \left ( x \right ) } \left ( -x-{\frac{{x}^{2}\tan \left ( x \right ) }{2}} \right ) }-{\frac{\ln \left ( \left ( \tan \left ( x \right ) \right ) ^{2}+1 \right ) }{2}}+\ln \left ( \tan \left ( x \right ) \right ) +{\frac{1}{2\,\tan \left ( x \right ) \left ( \left ( \tan \left ( x \right ) \right ) ^{2}+1 \right ) } \left ( -{\frac{\tan \left ( x \right ) }{2}}-x-2\,x \left ( \tan \left ( x \right ) \right ) ^{2}-{x}^{2}\tan \left ( x \right ) -{x}^{2} \left ( \tan \left ( x \right ) \right ) ^{3} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.5048, size = 138, normalized size = 4.18 \begin{align*} \frac{4 \, x \cos \left (x\right )^{3} - 12 \, x \cos \left (x\right ) -{\left (6 \, x^{2} + 2 \, \cos \left (x\right )^{2} - 1\right )} \sin \left (x\right ) + 8 \, \log \left (\frac{1}{2} \, \sin \left (x\right )\right ) \sin \left (x\right )}{8 \, \sin \left (x\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int x \cos ^{2}{\left (x \right )} \cot ^{2}{\left (x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.18014, size = 278, normalized size = 8.42 \begin{align*} -\frac{6 \, x^{2} \tan \left (\frac{1}{2} \, x\right )^{5} - 4 \, x \tan \left (\frac{1}{2} \, x\right )^{6} - 4 \, \log \left (\frac{16 \, \tan \left (\frac{1}{2} \, x\right )^{2}}{\tan \left (\frac{1}{2} \, x\right )^{4} + 2 \, \tan \left (\frac{1}{2} \, x\right )^{2} + 1}\right ) \tan \left (\frac{1}{2} \, x\right )^{5} + 12 \, x^{2} \tan \left (\frac{1}{2} \, x\right )^{3} - 12 \, x \tan \left (\frac{1}{2} \, x\right )^{4} + \tan \left (\frac{1}{2} \, x\right )^{5} - 8 \, \log \left (\frac{16 \, \tan \left (\frac{1}{2} \, x\right )^{2}}{\tan \left (\frac{1}{2} \, x\right )^{4} + 2 \, \tan \left (\frac{1}{2} \, x\right )^{2} + 1}\right ) \tan \left (\frac{1}{2} \, x\right )^{3} + 6 \, x^{2} \tan \left (\frac{1}{2} \, x\right ) + 12 \, x \tan \left (\frac{1}{2} \, x\right )^{2} - 6 \, \tan \left (\frac{1}{2} \, x\right )^{3} - 4 \, \log \left (\frac{16 \, \tan \left (\frac{1}{2} \, x\right )^{2}}{\tan \left (\frac{1}{2} \, x\right )^{4} + 2 \, \tan \left (\frac{1}{2} \, x\right )^{2} + 1}\right ) \tan \left (\frac{1}{2} \, x\right ) + 4 \, x + \tan \left (\frac{1}{2} \, x\right )}{8 \,{\left (\tan \left (\frac{1}{2} \, x\right )^{5} + 2 \, \tan \left (\frac{1}{2} \, x\right )^{3} + \tan \left (\frac{1}{2} \, x\right )\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]